package com.gof.example.simplefactory;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException {
//        Car car = CarFactory.createCar(BenzCar.class);
        Car car = Car.createCar(BenzCar.class);
        car.run();
//        car = CarFactory.createCar(BMWCar.class);
        car = Car.createCar(BMWCar.class);
        car.run();
    }
}
